
package com.sec.android.app.myfiles.module.download;

import com.sec.android.app.myfiles.provider.DbTableInfo;

public class DownloadDbTableInfo extends DbTableInfo {

    private static DownloadDbTableInfo mInstance = null;

    public static DbTableInfo getInstance() {
        if (mInstance == null) {
            mInstance = new DownloadDbTableInfo();
        }

        return mInstance;
    }

    private DownloadDbTableInfo() {
        mTableColumn.add(new DB_Column(COLUMN_ID.ID, "_id", "integer PRIMARY KEY AUTOINCREMENT"));
        mTableColumn.add(new DB_Column(COLUMN_ID.DOWNLOAD_ID, "_fileid", "integer not null"));
        mTableColumn.add(new DB_Column(COLUMN_ID.NAME, "name", "text"));
        mTableColumn.add(new DB_Column(COLUMN_ID.FILE_TYPE, "file_type", "integer"));
        mTableColumn.add(new DB_Column(COLUMN_ID.SIZE, "size", "integer"));
        mTableColumn.add(new DB_Column(COLUMN_ID.DATE, "date", "integer"));
        mTableColumn.add(new DB_Column(COLUMN_ID.PATH, "_data", "text"));
        mTableColumn.add(new DB_Column(COLUMN_ID.EXT, "ext", "text"));
        mTableColumn.add(new DB_Column(COLUMN_ID.MIME_TYPE, "mime_type", "text"));
        mTableColumn.add(new DB_Column(COLUMN_ID.SOURCE, "_source", "text"));
        mTableColumn.add(new DB_Column(COLUMN_ID.DESCRIPTION, "_description", "text"));
        mTableColumn.add(new DB_Column(COLUMN_ID.STATUS, "_status", "INTEGER"));
        mTableColumn.add(new DB_Column(COLUMN_ID.DOWNLOAD_BY, "_download_by", "integer"));
        mTableColumn.add(new DB_Column(COLUMN_ID.DOWNLOADED_ITEM_VISIBILITY, "_download_item_visibility", "BOOLEAN NOT NULL DEFAULT 1"));
        mTableColumn.add(new DB_Column(COLUMN_ID.FROM_S_BROWSER, "_from_s_browser", "BOOLEAN NOT NULL DEFAULT 0"));
    }

    @Override
    public String getTableName() {
        return "download_history";
    }

    @Override
    public boolean isRealDb() {
        return true;
    }
}
